package com.financing.platform.service;

import java.math.BigDecimal;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.financing.platform.common.ResultMap;
import com.financing.platform.dto.FpOrderCostDTO;
import com.financing.platform.dto.OrderByGaiZaoDTO;
import com.financing.platform.dto.OrderDTO;
import com.financing.platform.dto.OrderFlowDTO;
import com.financing.platform.vo.OrderManagerUserVO;
import com.financing.platform.vo.OrderVO;

public interface IOrderService extends IBaseService {
	/**
	 * 
	* @Title: queryOrderList 
	* @Description:  查询订单列表
	* @param   orderDTO
	* @return List<OrderDTO>   
	* @throws
	 */
	public List<OrderDTO> queryOrderList(OrderDTO orderDTO);
	
	/**
	 * 
	* @Title: queryOrderList 
	* @Description:  根据产品查询订单列表
	* @param   orderDTO
	* @return List<OrderDTO>   
	* @throws
	 */
	public List<HashMap<String, String>> queryOrderByProIdList(OrderVO orderDTO)throws SQLException;
	/**
	 * 
	* @Title: queryOrderList 
	* @Description:  统计根据产品查询订单列表
	* @param   orderDTO
	* @return List<OrderDTO>   
	* @throws
	 */
	public int countOrderByProIdList(OrderVO orderDTO)throws SQLException;
	
	/**
	 * 
	 * @Title: queryOrderAllInfoCount
	 * @Description: 查询订单列表总数 
	 * @param @param orderDTO
	 * @param @return
	 * @param @throws Exception   
	 * @return int   
	 * @throws
	 */
	public int queryOrderAllInfoCount(OrderVO orderVo) throws Exception;
	
	
	/**
	 * 
	* @Title: queryOrderDetail 
	* @Description:  查询订单详情
	* @param  orderDTO
	* @return OrderDTO   
	* @throws
	 */
	public OrderDTO queryOrderDetail(OrderDTO orderDTO);
	
	/**
	 * @throws SQLException 
	 * 
	* @Title: updateOrderStatus 
	* @Description: 更新订单状态
	* @param @param orderDTO
	* @param   type
	* @return int   
	* @throws
	 */
	public int updateOrderStatus(OrderDTO orderDTO) throws Exception;
	/**
	 * @throws SQLException 
	 * 
	* @Title: updateOrderStatus 
	* @Description: 更新订单拉黑状态
	* @param @param orderDTO
	* @param   type
	* @return int   
	* @throws
	 */
	public int updateOrderDefriendStatus(OrderDTO orderDTO) throws Exception;
	
	/**
	 * 
	* @Title: queryOrderList 
	* @Description: 查询订单所有信息
	* @param   orderVo
	* @return List<OrderVO>   
	* @throws
	 */
	public List<OrderVO> queryOrderList(OrderVO orderVo);
	
	/**
	 * 
	* @Title: orderCancel 
	* @Description:  取消订单
	* @param   orderDTO
	* @return int   
	* @throws
	 */
	public int orderCancel(OrderDTO orderDTO);
	
	/**
	 * 根据订单ID查询订单和产品信息
	 * @param ids 订单ID，可多个，中间“,”号分割
	 * @return
	 * @throws SQLException
	 */
	public List<OrderDTO> queryInfoByOrderIds(String ids) throws SQLException;

	public int queryOrderFollowUpAllInfoCount(OrderVO orderVo) throws SQLException;

	public List<OrderVO> queryOrderFollowUpList(OrderVO orderVo) throws SQLException;
	// 订单流程改造 start
	public OrderByGaiZaoDTO queryOrderDetailByGaiZao(OrderByGaiZaoDTO orderByGaiZaoDTO) throws SQLException;
	
	public List<OrderByGaiZaoDTO> queryOrderListByGaiZao(OrderByGaiZaoDTO orderByGaiZaoDTO) throws SQLException;
	
	public int queryOrderCountByGaiZao(OrderByGaiZaoDTO orderByGaiZaoDTO) throws SQLException;
	
	public int updateOrderStatusByGaiZao(OrderByGaiZaoDTO orderDTO) throws Exception;
	
	public List<OrderManagerUserVO> queryOrderOwnerUserList() throws SQLException;

	//订单基础信息-单表查询
	public List<OrderByGaiZaoDTO> queryOrderBaseInfoByGaiZao(OrderByGaiZaoDTO orderByGaiZaoDTO) throws SQLException;

	//订单-now	当前状态修改信息
	public void updateOrderStatusNow(OrderByGaiZaoDTO orderDTO,OrderVO orderVo) throws SQLException;

	//订单-130	预约成功
	public void updateOrderStatus130(OrderByGaiZaoDTO orderDTO,OrderVO orderVo) throws SQLException;
	//订单-120	成交价待审核
	public void updateOrderStatus120(OrderByGaiZaoDTO orderDTO, OrderVO orderVo) throws SQLException;
	//订单-140	成交价审核-不通过   取消预约  订单失败
	public void updateOrderStatus888(OrderByGaiZaoDTO orderDTO, OrderVO orderVo) throws SQLException;
	//订单-220	已打款、待确认
	public void updateOrderStatus220(OrderByGaiZaoDTO orderDTO, OrderVO orderVo,FpOrderCostDTO fpOrderCost) throws SQLException;
	//订单-240 	确认打款、待佣金到账
	public ResultMap updateOrderStatus240(OrderByGaiZaoDTO orderDTO, OrderVO orderVo) throws SQLException;
	//订单-310 	佣金到账、待结佣
	public void updateOrderStatus310(OrderByGaiZaoDTO orderDTO, OrderVO orderVo, FpOrderCostDTO fpOrderCost)throws SQLException;
	//订单-320 	已结佣、待确认
	public void updateOrderStatus320(OrderByGaiZaoDTO orderDTO, OrderVO orderVo, FpOrderCostDTO fpOrderCost)throws SQLException;
	//订单-330 	结佣结束
	public void updateOrderStatus330(OrderByGaiZaoDTO orderDTO, OrderVO orderVo)throws SQLException;
	//订单-360 	交易结束
	public void updateOrderStatus360(OrderByGaiZaoDTO orderDTO, OrderVO orderVo)throws SQLException;
	//订单-241 	后端结佣、待审核
	public void updateOrderBackStatus241(OrderByGaiZaoDTO orderDTO, OrderVO orderVo,FpOrderCostDTO fpOrderCost) throws SQLException;
	//订单-231 	审核不通过
	public void updateOrderBackStatus231(OrderByGaiZaoDTO orderDTO, OrderVO orderVo)throws SQLException;
	//订单-261 	审核不通过
	public void updateOrderBackStatus261(OrderByGaiZaoDTO orderDTO, OrderVO orderVo)throws SQLException;
	//订单-311 	佣金到账、待结佣
	public void updateOrderBackStatus311(OrderByGaiZaoDTO orderDTO, OrderVO orderVo,FpOrderCostDTO fpOrderCost)throws SQLException;
	//订单-321 	已结佣、待确认
	public void updateOrderBackStatus321(OrderByGaiZaoDTO orderDTO, OrderVO orderVo,FpOrderCostDTO fpOrderCost)throws SQLException;
	//订单-331 	结佣结束
	public void updateOrderBackStatus331(OrderByGaiZaoDTO orderDTO, OrderVO orderVo)throws SQLException;
	//获取订单流水
	public List<OrderFlowDTO> queryOrderFlowList(String orderId)throws SQLException;

	//更新订单
	public void updateOrder(OrderByGaiZaoDTO orderDTO) throws SQLException;

	//更新订单流水
	public void updateOrderFlow(OrderFlowDTO orderFlowDTO) throws SQLException;

	//获取订单前后时间
	public Map<String,Object> queryOrderMaxMinDateByProductId(Integer integer)throws SQLException;

  	public BigDecimal getAllAmount(OrderDTO orderDTO) throws SQLException;
	//获取已经成功订单的理财师
	public List<String> queryFaUserOrder()throws SQLException;

	
	//查询订单-昨日我的团队的业绩月度业绩
	public List<Map<String,Object>> queryOrderOwnerUserCountAmount()throws SQLException;

}